<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="../../../fanghuanweiran/trunk/js/theme/default/style.css" type="text/css"/>
    <script src="../../../jpp/jquery/jquery-1.7.min.js"></script>
    <script src="../../../jpp/openlayers/openlayers-2.11.min.js"></script>
    <script src="../../../jpp/socket.io/io-0.8.7.min.js"></script>
    <script src="../../../jpp/require/require-1.0.1.min.js"></script>
    <script src="../../../fanghuanweiran/trunk/js/olstk-0.1.min.js"></script>
    <!--script src="../src/Layer/WeSensors.js"></script>
    <script src="../src/WeTextIcon.js"></script>
    <script src="../src/WeTextMarker.js"></script>
    <script src="../src/WePopup.js"></script>
    <script src="../src/WeSensor.js"></script>
    <script src="../src/Sensor/WeWebcam.js"></script>
    <script src="../src/Sensor/WeMMS.js"></script>
    <script src="../src/Lang/en.js"></script>
    <script src="../src/Lang/zh-CN.js"></script-->
    <script src="../src//Weiran.js"></script>
    <script src="../src/Sensor.js"></script>
    <script type="text/javascript">
        var map, layer, account, webcam, mms;
        function init(){
            OpenLayers.ImgPath = '../../../fanghuanweiran/trunk/js/theme/default/img/';
            map = new OpenLayers.Map( 'map', {
                projection: new OpenLayers.Projection("EPSG:900913"),
                displayProjection: new OpenLayers.Projection("EPSG:4326"),
                units: "m",
                maxResolution: 156543.0339,
                maxExtent: new OpenLayers.Bounds(-20037509, -20037508.34, 20037508.34, 20037508.34)
            });
            map.addLayer(new OpenLayers.Layer.OSM());
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            map.addControl(new OpenLayers.Control.MousePosition());
            map.setCenter(new OpenLayers.LonLat(122.3599, 37.4105).transform(
                map.displayProjection,
                map.projection
            ), 12);
            //
            layer = new OpenLayers.Layer.WeMarkers();
            map.addLayer(layer);
            
            /*webcam = new OpenLayers.WeSensor.WeWebcam({
                lon: 122.3599,
                lat: 37.4105,
                webcamurl: 'http://iozoonc5.city.miyazaki.miyazaki.jp/CgiStart?page=Single&Language=12'
            });
            layer.addMarker(webcam);
            
            mms = new OpenLayers.WeSensor.WeMMS({
                lon: 122.3699,
                lat: 37.4109,
                mmsurl: 'mms://www.onedir.com/Cam1'
            });
            layer.addMarker(mms);*/
            
            for (var i=0; i<5; i++) {
                layer.addMarker(new Weiran.Sensor({
                    title: 'WeMarker ' + i,
                    lon: 122.3699 + Math.random(),
                    lat: 37.4109 + Math.random()
                }))
            }
        }
    </script>
  </head>
  <body onload="init()">
    <div id="map" style="height:300px; width: 1000px;"></div>
  </body>
</html>
